<template>
  <div>
    <div style="width:30%">
      <h3>考试课程简表</h3>
      <Divider style="height: 2px;margin:15px 0;display: inline-block;" />
    </div>
    <div style="width:80%">
      <Button id="b1" @click="exit()">返回</Button>
      <Divider style="height: 2px;margin:15px 0;display: inline-block;" />
    </div>
    <Table border :columns="columnshead" :data="ExaminationList"></Table>
    <br>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        columnshead: [{
            title: '当次课表开放专业数(计重复)',
            key: '当次课表开放专业数(计重复)'
          },
          {
            title: '应用型专业的课程数(不计重复)',
            key: '应用型专业的课程数(不计重复)'
          },
          {
            title: '应用型专业数(计重复)',
            key: '应用型专业数(计重复)'
          },
          {
            title: '专科专业数(计重复)',
            key: '专科专业数(计重复)'
          },
          {
            title: '本科专业数(计重复)',
            key: '本科专业数(计重复)'
          },
          {
            title: '长线专业的课程数(不计重复)',
            key: '长线专业的课程数(不计重复)'
          },
          {
            title: '当次开考的课程总数(不计重复)',
            key: '当次开考的课程总数(不计重复)'
          },
          {
            title: '长线专业数(计重复)',
            key: '长线专业数(计重复)'
          }
        ],
        ExaminationList: [],
        esId: ''
      }
    },
    created() {
      this.getParams()
      this.$axios.get(this.$host + '/examination/plan/examsProfessionalCoursesStatistics?examSessionId=' + this.esId).then(res => {
        console.log(res)
        this.ExaminationList.push(res.data.data)
      })
    },
    watch: {
      '$route': 'getParams'
    },
    methods: {
      getParams() {
        this.esId = this.$route.query.esId
      },
      exit() {
        this.$router.push({
          name: 'ESCList'
        })
      }
    }
  }
</script>

<style scoped>
  h3 {
    font-size: 1.75rem;
    float: left;
  }

  #b1 {
    float: right;
    background-color: burlywood;
  }

  #b2 {
    background-color: cadetblue;
  }

  #b3 {
    float: right;
    background-color: darksalmon;
  }
</style>
